//
//  IGMacro.h
//  ImGuider
//
//  Created by 李陆涛 on 2017/12/8.
//  Copyright © 2017年 imguider. All rights reserved.
//

#ifndef IGMacro_h
#define IGMacro_h
//------------切换环境----------------------------------------------------------

//App Store 环境
#define IG_AppStore

// 蒲公英环境
//#define IG_AppPGY

// 测试环境
//#define IG_AppTest

//-----------------------------------------------------------------------------
// 程序URL

#ifdef IG_AppStore
#define kBaseURLStr @"https://www.imguider.com/tourist/services/"
#elif defined IG_AppPGY
#define kBaseURLStr @"https://www.imguider.com/tourist/services/"
#else
#define kBaseURLStr @"http://domestic.imguider.com/tourist/services/"
#endif


#define LBXScan_Define_Native  //下载了native模块
#define LBXScan_Define_UI     //下载了界面模块

//----------------------------字体--------------------------------------------------------
#define FontBold(x) [UIFont boldSystemFontOfSize:x]
#define Font(x) [UIFont systemFontOfSize:x]

//----------------------------key--------------------------------------------------------
//通知
#define kDownloadCompleteDownNotif @"kHasCompleteDownNotif" // 下载完成或失败发送通知
#define kDownloadBeginDownNotif @"kDownloadBeginDownNotif" // 开始下载发送通知
#define kDownloadNotifLineID @"kDownloadNotifLineID" // 存储lineID 的key
#define kDownloadState @"kDownloadState" //State 的key
#define kRefreshUserNotif @"kRefreshUserNotif" // 刷新用户信息
#define kReloadUserDataNotif @"kReloadUserDataNotif" // 请求用户数据刷新用户信息
#define kLoginSuccessNotif @"kLoginSuccessNotif" // 登录成功

//#define kPlayManagerState @"kPlayManagerState"
#define kIGAvPlayerManagerState @"kIGAvPlayerManagerState"
#define kCurrentPlayURL @"CurrentPlayURL"
#define kPlayType @"kPlayType"
#define kRefreshMainVCNotif @"kRefreshMainVCNotif"// 刷新主页

#define kRedirectURL @"https://www.imguider.com"

#define kShareURLStr @"http://h5.imguider.com/tourist/services/"
//缓存key
#define kPath_ImageSave @"kPath_ImageSave"// 图片
#define kPath_ResponseCache @"ResponseCache"// 请求
#define DB_NAME @"DataBase"// 数据库
#define kKeychainService @"ImGuider"
#define kRecommenCacpePath @"RcommenCacpePath"

// appkey
#define UMENG_APPKEY @"58fed511f29d983427000404"// 友盟
#define BUGLY_APPID @"91b6c2d6ae"//bugly

// ---------------------------第三方登录、支付
#define UMENG_FB_APPID @"555012814832078"

#define UMENG_QQ_APPID @"1106076593"

#define UMENG_WB_APPKEY @"467068712"
#define UMENG_WB_APPSECRET @"edadefd1f9257d99ac0d5ff537767bd6"

#define UMENG_WX_APPID @"wxa64da1c01dc0c905"
#define UMENG_WX_APPSECRET @"a3542e4471088b5dcaf1c49f538121a4"

#define UMENG_Twitter_APPID @"fB5tvRpna1CKK97xZUslbxiet"
#define UMENG_Twitter_APPSECRET @"YcbSvseLIwZ4hZg9YmgJPP5uWzd4zr6BpBKGZhf07zzh3oj62K"

#define PAYPAL_SANDBOX_CLIENTID @"AahuzZ-yGAUntngQP38OmHKl-G6pFNSiw90sHavDXXS3eKwH3ddTBGQW_p5A4HH-ZoQpKlgKE7f9A71d"

#define PAYPAL_LIVE_CLIENTID @"AT1A-5C7YSHYB5bn283ef68W5tMFEg9tV_KUKMp5cA2vtrwjGw0VSibBkfny9wQtOHuZZqpyyOWYlyYy"

//----------------------------颜色--------------------------------------------------------

#define kThemeColor [UIColor colorWithHexString:@"#00B8E4"]
#define kThemeDarkColor [UIColor colorWithHexString:@"#2A2827"]
//#define kThemeDarkColor [UIColor colorWithHexString:@"#017EC9"]
//#define kThemeLightColor [UIColor colorWithHexString:@"#00B8E4"]
#define kThemeRedColor [UIColor colorWithHexString:@"#E64461"]
#define kThemeYellowColor [UIColor colorWithHexString:@"#F8C51C"]
#define kThemeCanYinYellowColor [UIColor colorWithHexString:@"#F37D15"]

#define kTitleColor [UIColor colorWithHexString:@"#242A34"]
#define kSubitleColor [UIColor colorWithHexString:@"#5A5A5A"]
#define kContentColor [UIColor colorWithHexString:@"#969696"]

#define kBGColor [UIColor colorWithHexString:@"#F7F7F7"]
#define kLineColor [UIColor colorWithHexString:@"#E5E5EA"]

#define kMengBanColor [kTitleColor colorWithAlphaComponent:0.2]


//---------------------------常用----------------------------------------------

#define kPlaceholderRec [UIImage imageNamed:@"placeholder_rec"]
#define kPlaceholderSqu [UIImage imageNamed:@"placeholder_squ"]

//----------------------------高度--------------------------------------------------------

// 高度固定为x，宽度等比缩小
#define kQiNiuHeightLock(url,x) [NSString stringWithFormat:@"%@?imageView2/2/h/%d",url,x]
// 宽度固定x，高度等比缩小
#define kQiNiuWidthLock(url,x) [NSString stringWithFormat:@"%@?imageView2/2/w/%d",url,x]
// 裁剪正中部分，等比缩小成 x,y
#define kQiNiuRatioLock(url,x, y) [NSString stringWithFormat:@"%@?imageView2/1/w/%d/h/%d",url,x,y]
// 定义导航条和tabbar高度
#define kStatusBarHeight (ISiPhoneX ? 44 : 20)
#define kNavigationBarHeight (ISiPhoneX ? 88 : 64)
#define kTableBarHeight (ISiPhoneX ? 83 : 49)

#define kBottomHeight (ISiPhoneX ? 34 : 0)

// 地图默认缩放级别
#define kZoomLevel 13

// 字体行间距
#define lineSpace  8

//-------------------------版本号------------------------------------------------------------
#define kVersion [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"]
#define kVersionBuild [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]

// 定义iPhone版本
#define ISiPhone4 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 960), [[UIScreen mainScreen] currentMode].size) : NO)
#define ISiPhone5 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 1136), [[UIScreen mainScreen] currentMode].size) : NO)
#define ISiPhone6 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(750, 1334), [[UIScreen mainScreen] currentMode].size) : NO)
#define ISiPhone6p ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1242, 2208), [[UIScreen mainScreen] currentMode].size) : NO)

#define ISiPhoneX IGUtil.isNotch

#define ISiPad  UI_USER_INTERFACE_IDIOM()==UIUserInterfaceIdiomPad

//判断当前系统版本号
#ifndef kSystemVersion
#define kSystemVersion [[UIDevice currentDevice] systemVersion].floatValue
#endif

#ifndef kiOS6Later
#define kiOS6Later (kSystemVersion >= 6)
#endif

#ifndef kiOS7Later
#define kiOS7Later (kSystemVersion >= 7)
#endif

#ifndef kiOS8Later
#define kiOS8Later (kSystemVersion >= 8)
#endif

#ifndef kiOS9Later
#define kiOS9Later (kSystemVersion >= 9)
#endif

#ifndef kiOS10Later
#define kiOS10Later (kSystemVersion >= 10)
#endif

#ifndef kiOS11Later
#define kiOS11Later (kSystemVersion >= 11)
#endif

//-------------------------IGLog------------------------------------------------------------
#ifdef DEBUG
#define IGLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
#else
#define IGLog(...)

#endif

#endif /* IGMacro_h */

